(function () {
	
	 /**
	 * 异步json获取
	 * @param {String} url 接口地址
	 * @param {Object} param 发送数据
	 * @param {Function} [success] 成功回调
	 * @param {Function} [error] 错误回调
	 */
var $modal = $('#pop-modal');
var aIds = cookie.get('goods_ids').split('-').join(',');
var iShowNum = 3; //默认展示条数
	if(!aIds) //没有车辆记录返回
	{
		$('.am-modal-bd').text(language.noCars);
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);
				return ;
	}
	
	console.log(aIds);

	 getPageData({
	 	ids:aIds,
	 	limit:iShowNum
	 });
	 
	 function getPageData (Filter)
	 {
	 	var Filter = Filter;
	 		
	 	getJson(Domain+'/ec/goods/doSearchGoodsCompareByIds.do', Filter, function (res) {
		  
		  if(!res.success){
	
		    $('.am-modal-bd').text(res.errorMessage);
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);

		  }
		  else{

				console.log(res);
	  	 	
		  }

		});
	 }

})();